<%@ page pageEncoding="UTF-8"%>

<%@ taglib uri="/tags/struts-tiles" prefix="tiles"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<%@ taglib uri="/tags/struts-nested" prefix="nested"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix='fmt'%>

<style>
	label {width: auto;}
	.opr {margin: 3px 2px;}
	.dispose {text-decoration: line-through; color: red;}
	ul.infoshow {padding:5px 0 0 5px; overflow:auto; width: 80%;}
	ul.infoshow li {line-height: 30px; float:left; margin-right: 15px;}
	.opdisabled {text-decoration: line-through; color: #DDD; line-height: 21px;}
	td.ongoing {background-color: #99FF99; color: #333;}
	td.finished {background-color: #ddd;}
</style>

<script>
	function after_switch(tab_index) {
		var current_panel = $.pdialog.getCurrent() && $.pdialog.getCurrent().filter(":visible").length > 0 ? $.pdialog.getCurrent() : navTab.getCurrentPanel();
		$("#currentindex", current_panel).val(tab_index);
	}
</script>

<form id="pagerForm" method="post" action="app/project/track.do?action=pageProjectTrackIndex">
	<input type="hidden" name="pageNum" value="${pageNum ne null ? pageNum : 1}" />
	<input type="hidden" name="numPerPage" value="${numPerPage ne null ? numPerPage : 20}" />
	<input type="hidden" id="currentindex" name="currentindex" value="${currentindex ne null ? currentindex : 0}" />
</form>

<!-- SearchBar -->
<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="app/project/track.do?action=pageProjectTrackIndex" method="post" id="searchForm" rel="pagerForm">
		<div class="searchBar">
			<table class="searchContent" id="record_form">
				<tr>
					<td>
						<label>项目编号：</label>
						<input type="text" name="projectNo" rel="pagerForm" value="${projectNo ne null ? projectNo : ''}" />
					</td>
					<td>
						<label>项目名称：</label>
						<input type="text" name="projectName" rel="pagerForm" value="${formEntity ne null ? formEntity.projectName : ''}" />
					</td>
					<td>
						<label>项目负责人：</label>
						<input id="projectMgrId" name="mgr.id" value="${formEntity ne null && formEntity.projectManager ne null ? entity.projectManager.id : ''}" type="hidden"/>
						<input id="projectMgr" type="text" name="mgr.username" rel="pagerForm" value="${formEntity ne null && formEntity.projectManager ne null ? formEntity.projectManager.username : ''}" postField="search" suggestFields="username,userNo" suggestUrl="app/base.do?action=lookupUserByName" lookupGroup="mgr" />
					</td>
				</tr>
				<tr>
					<td>
						<label>行业类别：</label>
						<select class="combox required" error_message="请选择`项目所属行业`" name="projectTypeId" id="proj_track_project_type">
							<option value="">请选择一个行业</option>
							<logic:present name="dictInds">
								<logic:iterate name="dictInds" id="dict">
									<option value="${dict.id}" ${projectTypeId ne null && projectTypeId eq dict.id ? 'selected="true"' : ''}>${dict.dictKey}</option>
								</logic:iterate>
							</logic:present>
						</select>
					</td>
					<td>
						<label>项目进展：</label>
						<select class="combox" name="condVO.condProjectProcess">
							<option value="">所有</option>
							<option value="-1" ${formEntity ne null && formEntity.condVO ne null && formEntity.condVO.condProjectProcess eq '-1' ? 'selected' : ''}>项目分配</option>
							<logic:present name="processes">
								<logic:iterate name="processes" id="process">
									<option value="${process.nodeTitle}" ${formEntity ne null && formEntity.condVO ne null && formEntity.condVO.condProjectProcess eq process.nodeTitle ? 'selected' : ''}>${process.nodeTitle}</option>
								</logic:iterate>
							</logic:present>
						</select>
					</td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
				</ul>
			</div>
		</div>
		<input type="hidden" name="currentindex" id="currentindex" value="${currentindex ne null ? currentindex : 0}" />
	</form>
</div>

<!-- Body -->
<div class="unitBox" id="jbsxBox">
	<div class="pageContent">
		
		<!-- Tabs -->
		<div class="tabs" currentindex="${currentindex ne null ? currentindex : 0}" eventtype="click">
			<div class="tabsHeader">
				<div class="tabsHeaderContent">
					<ul>
						<li class="selected"><a href="app/project/track.do?action=actionSwtichTab&status=0" class="j-ajax" callback="after_switch(0)" paramRef="pagerForm, record_form"><span>待提交材料<c:if test="${numProjectForPost ne null && numProjectForPost gt 0}">(${numProjectForPost})</c:if></span></a></li>
						<li><a href="app/project/track.do?action=actionSwtichTab&status=1" class="j-ajax" callback="after_switch(1)" paramRef="pagerForm, record_form"><span>审批中项目<c:if test="${numProjectForApproving ne null && numProjectForApproving gt 0}">(${numProjectForApproving})</c:if></span></a></li>
						<li><a href="app/project/track.do?action=actionSwtichTab&status=-1" class="j-ajax" callback="after_switch(2)" paramRef="pagerForm, record_form"><span>审批退回项目<c:if test="${numProjectForReturn ne null && numProjectForReturn gt 0}">(${numProjectForReturn})</c:if></span></a></li>
					</ul>
				</div>
			</div>
			<div class="tabsContent" style="height:auto;">
				<div inited="1000" style="display: none;"></div>
				<div inited="1000" style="display: block;"></div>
				<div inited="1000" style="display: block;"></div>
			</div>
			<div class="tabsFooter">
				<div class="tabsFooterContent"></div>
			</div>
		</div>
	</div>
</div>